import React from 'react';
import { Icon } from 'antd-mobile';
import styles from './publishPartTimeList.css';
import CustList from '../../../../../../common/lists/CustomList';

const PublishPartTimeList = ({
  list=[],
  loading,
  onViewMember=()=>{},
  onPagination=()=>{},
}) => {

  const partTimeListProps = {
    loading,
    list,
    onViewMember,
    onPagination,
    showLimit(id){
      onViewMember(id);
    }
  }

  // console.log('list', JSON.stringify(list));

  const showPartTimeList = () => {
    if(list && list.length > 0){
      return <CustList {...partTimeListProps}/>;
    }else{
      return (
        <div className={styles.listIsNull}>
          暂无
        </div>
      )
    }
  }

  return(
    <div className={styles.publishPartTimeList}>
      <div className={styles.title}>
        在招兼职
      </div>
      {showPartTimeList()}
    </div>
  )
}

export default PublishPartTimeList;
